<?php
session_start();
$email=$_SESSION['email'];
//include_once('databaseconnection.php');
 

if(isset($_SESSION['languages']))
{
$languagess=$_SESSION['languages'];

	$query = "SELECT * FROM suggestions WHERE language='$languagess' AND (status='To Be Discussed')";   
}	
else
{
$query = "SELECT * FROM suggestions WHERE status='To Be Discussed'";  
}
 include ('headerforsuggestion.php');
 



$result = mysql_query($query);

if (mysql_num_rows($result) >= 1) 
  {
  echo "<table border='1'  cellspacing='1' cellpadding='2'  align='left' width='100%'>
<tr>
<th>Term</th>
<th>Domain</th>
<th>Language</th>
<th>Suggested Meaning</th>
<th>Status</th>
<th>Suggested Date</th>
<th>Votes</th>
<th>More</th>

</tr>";
while($row=mysql_fetch_array($result))
{

echo "<tr>";
$term=$row['term'];
echo "<td width='15%'>".$row['term']."<input type='hidden' name='butt' value='$term'</td>";

echo "<td width='15%'>".$row['domain']."</td>";

echo "<td width='15%'>".$row['language']."</td>";
$sugg=$row['suggestion'];
echo "<td width='20%'>".$row['suggestion']."<input type='hidden' name='butt1' value='$sugg'</td>";
echo "<td width='12%'>".$row['status']."</td>";
echo "<td width='10%'>".$row['suggested_date']."</td>";

$votes=$row['votes'];
echo "<td width='7%'><a href='votesofsugg.php?err=$term.$sugg'>".$votes."</a></td>";

//echo "<td width='5%'><input type='submit' name='$term' value='More'/></td>";

echo "<td width='3%'><a href='updateSuggestionComment.php?lis=$term.$sugg.$votes'>More</a></td>";


echo "</tr>";
}
echo "</table>";
}
else
{
 echo   "<table width='960px' height='82' border='1' class='table' align='left'>";
   echo "<tr><td>No Suggestions in To Be Discussed state</a></td></tr>";
   echo "</table>";
}
include ("footer.php");

?>